<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>babel安装</h1>
    <p>1.安装babel：cnpm install --save-dev @babel/core</p>
    <p>
      2. 配置文件：配置文件后缀.babelrc <br />内容为{"presets": [],"plugins":[]}
    </p>
    <p>3.转码规则：npm install --save-dev &badel/preset-env</p>
    <p>4.将加入规则.babelrc：{"presets": [@babel/env],"plugins":[]}</p>
    <p>5.命令行转码：npm install --save-dev @babel/cli</p>
    <p>6.转码方法：npx babel .\需要转码文件名 -o 转码后文件名</p>
  </body>
</html>
